home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10406 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: compilers
  5. Date: 18 Mar 1996 03:55:25 +1200
  6. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  7. Message-ID: <4ihcld$iln@airdmhor.gen.nz>
  8. References: <4iburm$aps@airdmhor.gen.nz> <DoBvF6.GG5@iquest.net>
  9. NNTP-Posting-Host: airdmhor.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. gumboot@airdmhor.gen.nz (Simon Hosie) wrote:
  13. >   Does anyone know of a compiler that can take
  14. > for (;;)
  15. > {
  16. >     Stuff(1);
  17. >     if (Cond)
  18. >         break;
  19. >     Stuff(2);
  20. > }
  21. >   and make
  22. > goto EntryPoint;
  23. > do
  24. > {
  25. >     Stuff(2);
  26. > EntryPoint:
  27. >     Stuff(1);
  28. > } while (Cond);
  29.  
  30. Doug Miller:
  31. > A possibly more important question is why you would want it to, since the first form is vastly
  32. > more comprehensible.
  33.  
  34.   Well, it would compile it, so you'd never get to see the difference, but
  35. the latter has only 1 conditional jump and no 'definite'jumps in the inner 
  36. loop whereas the former has 1 conditial jump (not usually taken) and a
  37. 'definite' jump.
  38.